package com.coder.network.request

import io.reactivex.Observable
import okhttp3.ResponseBody
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.Streaming
import retrofit2.http.Url

/**
 * @author yuhushuan
 * @ClassName: DownloadApi
 * @Description: 文件下载
 * @date 2017/2/6 09:44
 */
interface DownloadApi {
    @Streaming //大文件需要加入这个判断，防止下载过程中写入到内存中
    @GET
    fun download(@Header("RANGE") start: String?, @Url url: String?): Observable<ResponseBody?>?

    @Streaming //大文件需要加入这个判断，防止下载过程中写入到内存中
    @GET
    fun download(@Url url: String?): Observable<ResponseBody?>?
}